<%-- 
    Document   : tourjoin
    Created on : Aug 28, 2012, 8:47:13 AM
    Author     : ems
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
          <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
         <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery-1.7.2.min.js"></script>
         <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
    </head>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){


            //validateform("form-input-customer");
        });

    </script>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
               $j('.keysearch').live('keyup',function(){
                   $j('.rich-table-row').hide();
                   $j('.rich-table-row').each(function(){
                       html = $j(this).html();
                      // alert( ununicode(html));  || html.indexOf( $j('.keysearch').val()) > -1
                       if(   html.indexOf( $j('.keysearch').val()) > -1    )  {
                            $j(this).show();
                       }else{
                           $j(this).hide();
                       }

                   });
               });

        });
    </script>
    <style type="text/css">
        .rich-inplace-view{
            background:none;
            border-bottom: none ;
        }
        .fields_input{
            float:left;
            width:200px;
            margin-top:5px;
        }
                .fields_input label{
                   font-weight: bold;
                   width:100%;
                   float:left;
        }
                .fields_input input{
                   padding:2px;
                   width:160px;
                   float:left;
        }
        .searchbox{
            float:left;
            width:600px;
            height:80px;
            margin-left: 100px;
        }
        .sort_char a{
            border-right: 1px solid #82A6C7;
            color: #82A6C7;
            display: inline-block;
            line-height: 10px;
            padding: 0 5px;
            cursor:pointer !important;
            text-decoration: none;
            font-size:10px;

        }
        .sort_char{ text-align: center;margin:8px 0px 9px 6px}
        .sort_char label{ cursor:pointer !important;}
        .buttonsearch{
             border:0;
            background:url(../images/bg_submit.gif) repeat-x;
            width:68px;

            margin:-3px 0 10px 0;
            color:#ffffff;
            font-size:12px;
            font-weight:bold;
            cursor:pointer;
            border-radius:2px;
            padding:4px 0;
            text-transform:uppercase;
          }
    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;overflow: hidden;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>

                <div class="popup" style="height:412px; width:960px; margin-top:13px; margin-right: 12px ">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="Lịch sử tour"/></div>
                        <div style=" position: fixed; float:left; height:50px;width:50px;left:908px;">
                            <a id="fancybox-close" onclick="self.parent.tb_remove()"  style="display: block; float:left;"></a>
                        </div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content" style="background:white;">


                                    <div class="sort_char" style="float:left;width:460;">
                                        <%--  <a4j:repeat value="#{EmpBean.listAlpha}" var="item">
                                              <h:commandLink action="#{EmpBean.searchAlpha}">
                                                  <h:outputText value="#{item.alpha}" />
                                                  <f:param value="#{item.alpha}" name="idSearch"></f:param>
                                              </h:commandLink>

                                        </a4j:repeat>--%>
                                       

                                    </div>
                                    <div class="search_char" style="float:left;width:500px;height: 30px;padding: 8px 0px 0px 5px;">
                                         <h:inputText value="" styleClass="keysearch"  style="width:393px"/>
                                        <h:commandButton       value="#{locale.search}" style="margin-left:5px;" styleClass="buttonsearch">
                                        </h:commandButton>
                                    </div>
                            <div class="list_customer" style="width:950px; height:275px; overflow-y:auto; overflow-x: hidden">
                                                             <rich:dataTable value="#{k400Controller.listtour}" var="cus"
                                                                                                    rows="50"
                                                                                                    reRender="#{!empty k400Controller.listtour}"
                                                                                                    onRowMouseOver="this.style.backgroundColor='#DEE1E2'"
                                                                                                    onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                                                                                                    style=" margin-left:10px;"

                                                                                                    width="926px" columnClasses=",columns,columns,columns" rowKeyVar="row"
                                                                                                    id="table" styleClass="machinePosDataTable">

                                                                                        <rich:column style="width:40px; text-align:center">
                                                                                            <f:facet name="header">
                                                                                                <h:outputText value="STT" />
                                                                                            </f:facet>
                                                                                           <h:outputText value="#{row+1}" />
                                                                                       </rich:column>
                                                                                        <rich:column style="width:120px;">
                                                                                            <f:facet name="header">
                                                                                                <h:outputText value="Mã tour" />
                                                                                            </f:facet>
                                                                                            <div style="width:120px;">
                                                                                                <h:outputText value="#{cus.vv051}" />
                                                                                            </div>
                                                                                        </rich:column>


                                                                                       <rich:column  style="width:auto">
                                                                                            <f:facet name="header">
                                                                                                <h:outputText value="#{locale.description}" />
                                                                                            </f:facet>
                                                                                            <div style="width:auto">
                                                                                                <h:outputText value="#{cus.vv052}" />
                                                                                            </div>

                                                                                      </rich:column>
                                                                                     <f:facet name="footer">
                                                                                        <rich:datascroller id="ds" for="table"></rich:datascroller>
                                                                                    </f:facet>
                                                               </rich:dataTable>
                            </div>

                        </div>

                        </div>

                </div>
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>

